package com.borqs.samples;

import android.net.Uri;

public class DBProvider {

    public static final String CONTENT_TYPE = "vnd.android.cursor.dir/vnd.jacp.demo";
    public static final String CONTENT_ITEM_TYPE = "vnd.android.cursor.item/vnd.jacp.demo";

    /**
     * save SessionSTable constant
     * 
     * @author b753
     * 
     */
    public static final class SessionsTable implements BaseColumns {

        public static final String AUTHORITY = "com.mydbtest.contentprovider.sessions";
        public static final Uri CONTENT_URI = Uri.parse("content://"
                + AUTHORITY + "/sessions");
        public static final String TABLE_NAME = "sessions";
        public static final String DEFAULT_SORT_ORDER = "_id desc";

        public static final String START_TIME = "start_time";
        public static final String START_AVERAGE = "start_average_v";
        public static final String START_CHARGE = "start_charge";
        public static final String STOP_TIME = "stop_time";
        public static final String STOP_AVERAGE = "stop_average_v";
        public static final String STOP_CHARGE = "stop_charge";
        public static final String STOP_REASON = "stop_reason";
    }

    // "create table"
    // +" samples(id integer primary key autoincrement,"
    // +" time integer,"
    // +" session_id integer)";
    /**
     * SamplesTable constant
     * 
     * @author b753
     * 
     */
    public static final class SamplesTable implements BaseColumns {

        public static final String AUTHORITY = "com.mydbtest.contentprovider.sessions";
        public static final Uri CONTENT_URI = Uri.parse("content://"
                + AUTHORITY + "/samples");
        public static final String TABLE_NAME = "samples";
        public static final String DEFAULT_SORT_ORDER = "_id desc";

        public static final String TIME = "time";
        public static final String SESSION_ID = "session_id";
    }

    // "create table"
    // +" alarm_samples(id integer primary key autoincrement,"
    // +" pkg integer,"
    // +" count integer,"
    // +" sample_id integer)";
    public static class AlarmSamplesTable implements BaseColumns {

        public static final String AUTHORITY = "com.mydbtest.contentprovider.data";
        public static final Uri CONTENT_URI = Uri.parse("content://"
                + AUTHORITY + "/alarm_samples");
        public static final String TABLE_NAME = "alarm_samples";
        public static final String DEFAULT_SORT_ORDER = "_id desc";

        public static final String PKG = "pkg";
        public static final String COUNT = "count";
        public static final String SAMPLE_ID = "sample_id";
    }

    // "create table"
    // +" wakelock_samples(id integer primary key autoincrement,"
    // +" tag txt,"
    // +" time_length integer,"
    // +" sample_id integer)";
    public static class WakeLockSamplesTable implements BaseColumns {

        public static final String AUTHORITY = "com.mydbtest.contentprovider.data";
        public static final Uri CONTENT_URI = Uri.parse("content://"
                + AUTHORITY + "/wakelock_samples");
        public static final String TABLE_NAME = "wakelock_samples";
        public static final String DEFAULT_SORT_ORDER = "_id desc";

        public static final String TAG = "tag";
        public static final String TIME_LENGTH = "time_length";
        public static final String SAMPLE_ID = "sample_id";
    }

    // "create table"
    // +" process_samples(id integer primary key autoincrement,"
    // +" pid integer,"
    // +" name text,"
    // +" rel_utime integer,"
    // +" rel_stime integer,"
    // +" rel_uptime integer,"
    // +" sample_id integer)";
    public static class ProcessSamplesTable implements BaseColumns {

        public static final String AUTHORITY = "com.mydbtest.contentprovider.data";
        public static final Uri CONTENT_URI = Uri.parse("content://"
                + AUTHORITY + "/process_samples");
        public static final String TABLE_NAME = "process_samples";
        public static final String DEFAULT_SORT_ORDER = "_id desc";

        public static final String PID = "pid";
        public static final String NAME = "name";
        public static final String REL_UTIME = "rel_utime";
        public static final String REL_STIME = "rel_stime";
        public static final String REL_UPTIME = "rel_uptime";
        public static final String SAMPLE_ID = "sample_id";

    }

    // "create table"
    // + " developer_data(_id integer primary key autoincrement,"
    // + " time integer," + " wifi_state integer," + " gps_state integer,"
    // + " sync_state integer," + " airplane_state integer,"
    // + " airplane_state integer," + " start_average_v integer)";
    public static class DeveloperTable implements BaseColumns {

        public static final String AUTHORITY = "com.mydbtest.contentprovider.developer";
        public static final Uri CONTENT_URI = Uri.parse("content://"
                + AUTHORITY + "/developer");
        public static final String TABLE_NAME = "developer_data";
        public static final String DEFAULT_SORT_ORDER = "_id desc";

        public static final String TIME = "time";
        public static final String WIFI_SATE = "wifi_sate";
        public static final String GPS_SATE = "gps_state";
        public static final String SYNC_SATE = "sync_state";
        public static final String AIRPLANE_STATE = "airplane_state";
        public static final String START_VELOCITY = "start_average_v";

    }

}
